/**
 * 
 */
package com.login.gwj.services;

import java.sql.Timestamp;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.login.gwj.dao.UserDao;
import com.login.gwj.domain.User;

/**
 * @author Administrator
 * 
 */
@Transactional
public class UserServiceImpl implements UserService {

	@Resource
	UserDao userDao;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.zhbit.bbs.services.UserService#insertUser(com.zhbit.bbs.domain.User)
	 */


	public User insertUser(User user) {
		// TODO Auto-generated method stub
		return userDao.insertUser(user);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.zhbit.bbs.services.UserService#updateUser(com.zhbit.bbs.domain.User)
	 */

	public User updateUser(User user) {
		// TODO Auto-generated method stub
		return userDao.updateUser(user);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.zhbit.bbs.services.UserService#deleteUser(com.zhbit.bbs.domain.User)
	 */

	public void deleteUser(User user) {
		// TODO Auto-generated method stub
		userDao.deleteUser(user);

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.zhbit.bbs.services.UserService#searchUser(java.lang.String)
	 */
	@Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)

	public List searchUser(String whereSql,User user) {
		// TODO Auto-generated method stub
		return userDao.searchUser(whereSql,user);
	}

	public List searchUserR(String whereSql, User user) {
		// TODO Auto-generated method stub
		return userDao.searchUserR(whereSql,user);
	}
	public List<User> searchallUser(String string, Timestamp logindata) {
		// TODO Auto-generated method stub
		return userDao.searchallUser(string,logindata);
	}
}
